<link rel="stylesheet" type="text/css" href="<?=$this->applicationUrl()?>/public/css/shopping-cart.css" media="screen" />
<div class="main-content">
    <!-- <div class="content-banner"><img src="<?=$this->applicationUrl()?>/public/images/visu-best-price.jpg" width="710" height="239" alt="" /><span class="best-price"><img src="images/best-price.png" width="111" height="129" alt="Best Price" /></span></div>-->
	<h3>Giỏ hàng</h3>
	<div class="inner-content">
		<?php
			if (count($this->products)== 0) {		
				echo '<p><label>Bạn chưa chọn sản phẩm nào để đặt hàng. Vui lòng chọn sản phẩm</label></p>';
			} else {
		?>
		<table class="confirm-order">
			<tr>
				<th>Stt</th>
				<th>Tên hàng</th>
				<th class="number">Số lượng</th>
				<th class="number">Đơn giá</th>
				<th class="number">Thành tiền</th>
				<th></th>
			</tr>
			<?php foreach($this->products as $product) : ?>
			<form action="<?= $this->baseUrl('/member/remove-product/') ?>" method="post" id="removeItem">
			<tr>
				
				<td width="50">1</td>
				<td width="200" class="product"><?php echo $product['detail']['name']?></td>
				<td width="100" class="number"><?php echo $product['quantity']?></td>
				<td width="100" class="number"><?php echo $product['detail']['price']?></td>
				<td width="100" class="number"><?php echo ($product['quantity'] * $product['detail']['price'])?></td>
				<input type="hidden" name="product_id" id="product_id" value="<?php echo $product['detail']['product_id']?>"/>
				<td width="50" class="delete"><img onclick="javascript:document.forms['removeItem'].submit();" src="<?=$this->applicationUrl()?>/public/images/delete.png" width="20" height="20" /></td>
				
			</tr>
			</form>
			<?php endforeach; ?>
			<tr>
				<td colspan="4">Tổng</td>
				<td class="number"><?php echo $this->price ?></td>
				<td></td>
			</tr>
		</table>
		<p>
			<form name="mosForm" method="post" action="<?= $this->baseUrl('/member/shoppingcart/') ?>">
				<input type="hidden" id="confirm" name="confirm" value="1"/>
				<input id="btnSubmit" class="submit-order" type="submit" name="btnSubmit" value="Xác nhận"/>
				<input id="btnContinue" class="submit-order" type="button" name="btnSubmit" value="Tiếp tục mua hàng" onclick="window.location = '<?=$this->applicationUrl()?>/site/product/'; return false;" />
			</form>
			
		</p>
		<?php
			}
		?>
	</div>
</div>
